﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EmployeeNavigate.ascx.cs" Inherits="WebUI.UserControls.EmployeeNavigate" %>
<asp:LinkButton runat="server" ID="lnkEmployeeAction" Text="[lnkEmployeeAction]" CssClass="ctxMenu" OnClientClick="return false;"></asp:LinkButton>

<script type="text/javascript">
    var menuAction = [
                    {'Xem chi tiết':{
                                      onclick: function(menuItem,menu)
                                                    {
                                                        window.location.href='<% =GetPagePath(string.Format("ViewEmployee.aspx?id={0}",RecordID))%>';
                                                    },
                                      disabled: <%= IsDisabled("ViewEmployee.aspx") %>
                                    }
                    },
                    {'Sửa':{
                            onclick:function(menuItem,menu)
                            {
                                window.location.href='<% =GetPagePath(string.Format("EditEmployee.aspx?id={0}",RecordID))%>';
                            },
                            disabled: <%= IsDisabled("EditEmployee.aspx") %>
                           }
                    },
                    $.contextMenu.separator,
                    
                    {'Hợp đồng lao động':
                        {
                            onclick:function(menuItem,menu)
                                {
                                    window.location.href='<% =GetPagePath(string.Format("EmployeeContract.aspx?id={0}",RecordID))%>';
                                },
                            disabled:  <%= IsDisabled("EmployeeContract.aspx") %>
                        }
                    },                   
                    {'Nghỉ phép':
                        {
                            onclick: function(menuItem,menu)
                                {
                                    window.location.href='<% =GetPagePath(string.Format("EmployeeLeave.aspx?id={0}",RecordID))%>';
                                },
                            disabled: <%= IsDisabled("EmployeeLeave.aspx") %>    
                        }
                    },
                    {'Khen thưởng/Kỷ luật':
                        {
                            onclick:function(menuItem,menu)
                                {
                                    window.location.href='<% =GetPagePath(string.Format("EmployeeReward.aspx?id={0}&type=0",RecordID))%>';
                                },
                            disabled: <%= IsDisabled("EmployeeReward.aspx") %>    
                        }
                    }
                ];
        
    $(function() 
        {
            $('.ctxMenu').contextMenu(menuAction,{theme:'vista'});
        }
     );
</script>